﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:BuildHandlers="clr-namespace:Bazookabird.Wpf.Builds.BuildHandlers"
                    xmlns:Model="clr-namespace:Bazookabird.Wpf.Model"
                    x:Class="Bazookabird.Wpf.Queries.QueryHandlers.SimpleCmmiProcessTaskViewer.c__projects_bazookabird_sln_bazookabird_wpf_src_bazookabird_wpf_queries_queryhandlers_simplecmmiprocesstaskviewer_simplelayouts_xaml">
    <BuildHandlers:GetFieldByIdConverter x:Key="fieldByIdConverter" />
    <DataTemplate DataType="{x:Type Model:WorkItemNode}">
        <Border Margin="5, 5, 5, 5">
            <Border.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="FontWeight" Value="Bold" />
                    <Setter Property="TextTrimming" Value="CharacterEllipsis" />
                </Style>
            </Border.Resources>
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFF9FFC3" Offset="1"/>
                    <GradientStop Color="#FFFEFF46" Offset="0.009"/>
                    <GradientStop Color="#FFFAFF71" Offset="0.609"/>
                </LinearGradientBrush>
            </Border.Background>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Text="{Binding WorkItem.Title}" Margin="5,5,5,5"
								   TextWrapping="Wrap" Grid.ColumnSpan="2" FontWeight="Bold" />
                <TextBlock Text="{Binding WorkItem.Description}" Margin="5,0,0,5" 
								   Grid.ColumnSpan="2" Grid.Row="1" TextWrapping="Wrap" FontWeight="Normal" />
                <TextBlock Text="Assigned to:" Grid.Row="2" Margin="5,5,5,0" />
                <TextBlock Text="{Binding Converter={StaticResource fieldByIdConverter}, ConverterParameter='System.AssignedTo'}" 
                           Grid.Row="2"  Grid.Column="1" HorizontalAlignment="Right" Margin="0,5,5,0" />

                <TextBlock Text="Remaining:" Grid.Row="3" Margin="5,5,5,5" />
                <TextBlock Text="{Binding Converter={StaticResource fieldByIdConverter}, ConverterParameter='Microsoft.VSTS.Scheduling.RemainingWork'}" 
								   Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" Margin="0,5,5,5" />
            </Grid>
        </Border>
    </DataTemplate>

</ResourceDictionary>